package com.ayun.member.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author 斌叔
 * @description: TODO
 * @create 2022-05-08 22:51
 */
@EnableTransactionManagement
// 开启事务管理
@MapperScan("com.ayun.member.mapper")
// 扫描Mapper接口
@Configuration
public class MybatisPlusConfig {
    //分页插件
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
